package com.huawei.appgallery.appcomment.ui.thirdcomment;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.huawei.secure.android.common.intent.SafeIntent;
import o.ayw;
import o.ayy;
import o.bcb;
import o.bcl;
import o.beh;
import o.bem;
import o.cku;
import o.Logger;
import o.evd;

public class ThirdDialogResultActivity extends Activity implements bem {
    private beh ˏ;

    protected void onCreate(Bundle bundle) {
        ayy.ˋ().ˎ(getWindow());
        ayw.ॱ(this);
        super.onCreate(bundle);
        requestWindowFeature(1);
        evd.ˏ(getWindow());
        Intent intent = getIntent();
        if (intent == null) {
            Logger.e("ThirdDialogResultActivity", "intent is null");
            finish();
            return;
        }
        Bundle extras = new SafeIntent(intent).getExtras();
        if (extras == null) {
            Logger.e("ThirdDialogResultActivity", "bundle is null");
            finish();
            return;
        }
        cku ˏ = cku.ˏ(this, beh.class, null, null);
        if (ˏ instanceof beh) {
            this.ˏ = (beh) ˏ;
            this.ˏ.ˋ(extras);
            this.ˏ.ˎ((bem) this);
        }
        ˏ.ˋ(this, "ThirdCommentDialog");
        new bcl().ˏ(extras.getString("APP_ID"), extras.getString("DIALOG_NO"));
    }

    public void ˏ(int i) {
        bcb.ˋ.ˋ("ThirdDialogResultActivity", "resultCode=" + i);
        setResult(i);
        finish();
    }

    public void onActivityResult(int i, int i2, Intent intent) {
        bcb.ˋ.ˋ("ThirdDialogResultActivity", "resultCode=" + i2);
        if (i2 == 0) {
            setResult(102);
        } else if (i2 != 103 || this.ˏ == null) {
            setResult(i2);
        } else {
            this.ˏ.ˋ("score/4/1");
            setResult(i2);
        }
        finish();
    }
}
